﻿#include "Renderer.h"
#include "RenderDevice.h"
#include <glm/mat4x4.hpp>

namespace DYEngine
{
	Renderer::Renderer(): Component(), mMaterial(nullptr)
	{

	}

	Renderer::~Renderer()
	{
		mMaterial = nullptr;
		Component::~Component();
	}

	void Renderer::Draw()
	{

	}

	void Renderer::Init()
	{
		RenderDevice::AddRenderer(this);
	}

	void Renderer::Enable()
	{

	}

	void Renderer::Update()
	{

	}

	void Renderer::Disable()
	{

	}

	void Renderer::Destroy()
	{
		RenderDevice::RemoveRenderer(this);
		if (mMaterial != nullptr)
		{
			delete mMaterial;
			mMaterial = nullptr;
		}
	}
}
